<?php

class clsLogs{

public function doLog($filename,$text,$type="a")
{
if ($type=="a")
$text='<tr>
<td>'.date("d-m-Y, H:i").'</td>
<td>'.$_SERVER['HTTP_HOST'].'</td>
'.$text.'
</tr>
';

  $fh = fopen('Logs/'.$filename, $type) ;
  if ($fh){
  
	  if(!fwrite($fh, $text)){
	   echo "Could not write file!";
	  }else{
	  fclose($fh);
	  }
  
  }else{
  echo("Could not open log file.");
  }

 
}



}


